package com.service.imp;

import com.mapper.TongZhiMapper;
import com.pojo.TongZhi;
import com.pojo.User;
import com.service.TongZhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Collections;
import java.util.List;
@Service
public class TongZhiServiceImpl implements TongZhiService {

    @Autowired
    private TongZhiMapper tongZhiMapper;
    @Override
    public List<TongZhi> findAll() {
        return tongZhiMapper.selectAll();
    }

    @Override
    public List<TongZhi> findmh(TongZhi tongZhi) {
        return tongZhiMapper.selectmh(tongZhi);
    }

    @Override
    public Integer update(TongZhi tongZhi) {
        return tongZhiMapper.update(tongZhi);
    }

    @Override
    public Integer tianjia(TongZhi tongZhi) {
        return tongZhiMapper.insert(tongZhi);
    }

    @Override
    public Integer delete(TongZhi tongZhi) {
        return tongZhiMapper.delete(tongZhi);
    }
}
